#include "Fit/RooArgusBESIII.h"
#include "RooAbsReal.h"
#include "RooFit.h"
#include <iostream>
#include <math.h>
using namespace std;

// ClassImp(RooArgusBESIII);

RooArgusBESIII::RooArgusBESIII(const char* name, const char* title, RooAbsReal& _m, RooAbsReal& _m0,
                               RooAbsReal& _c, RooAbsReal& _p) :
  RooAbsPdf(name, title),
  m("m", "m", this, _m),
  m0("m0", "m0", this, _m0),
  c("c", "c", this, _c),
  p("p", "p", this, _p)
{}

RooArgusBESIII::RooArgusBESIII(const RooArgusBESIII& other, const char* name) :
  RooAbsPdf(other, name),
  m("m", this, other.m),
  m0("m0", this, other.m0),
  c("c", this, other.c),
  p("p", this, other.p)
{}

Double_t RooArgusBESIII::evaluate() const
{
  double diff = m - m0;
  return pow(diff, p) * exp(-c * diff);
}